package co.edu.unal.geditor.view;



import java.awt.Graphics;

import co.edu.unal.geditor.model.GraphElement;

public abstract class ElementView
{
	// all (concrete) view elements are responsible 
	// for knowing how to render themselves

	// v0.6 : also responsible for calling this paint() to handle selected status
	public void paint( Graphics g )
	{
		
		// selected status (on/off) handled here
		if(m_owner.getBoundBox().getView()!=null){
			m_owner.getBoundBox().paint(g);
		}
		
		
	}

	public ElementView( GraphElement ge )
	{
		assert ge != null;
		
		m_owner = ge;
	}
	
	// the element this view belongs to
	protected GraphElement m_owner;
	

	
	
}
